<?php
require_once('../config.php');
require_once(ROOT.'includes/class.user.php');
require_once('../includes/functions.php');
$user_id= $_GET['uid'];
header("Content-Type: text/html; charset=UTF-8");

$user = new User();
$user_row = DB::queryFirstRow("SELECT * FROM `account` WHERE `id`=%i", $user_id);
$user -> sendActivationEmail($user_id, $user_row['username'], $user_row['activation_key'], $user_row['email']) or die('激活邮件发送失败，请返回重试');

js_redirect('激活邮件已发送，正在返回首页', HOME_URL,500);
?>